package design.dynamic;

import java.lang.reflect.Proxy;

public class TestDesign {

    public static void main(String[] args) {
        CivilSubject civilSubject = new CivilSubjectIml();
        CivilSubject civilProxy = (CivilSubject) Proxy.newProxyInstance(civilSubject.getClass().getClassLoader(),
                new Class[]{CivilSubject.class},new DynamicProxyLawyer(civilSubject));
        civilProxy.civilLawsuit();
    }
}
